Test Plan for ZDOCj

HeadPost()
  Head=Tail
    ok Both at BOF
    ok Both at EOF
    ok Both somewhere in file
  ok Post request larger than avail in field
  ok Post request of zero
  Field < record
    ok whole field matches record
    ok record matches to req size
    ok record does not match to req size
  Field exactly equal to record size
    ok whole record matches field
    ok record matches to req size
    ok record does not match to req size
  Field > than record
    ok whole record matches field
    ok record matches to req size
    record does not match to req size
      ok FieldHead.offset is zero
      ok FieldHead.offset is not zero

TailPost()
  Head=Tail
    ok Both at BOF
    ok Both at EOF
    ok Both somewhere in file
  ok Post request larger than avail in field
  ok Post request of zero
  Field < record
    ok whole field matches record
    ok record matches to req size
    ok record does not match to req size
  Field exactly equal to record size
    ok whole record matches field
    ok record matches to req size
    ok record does not match to req size
  Field > than record
    ok whole record matches field
    ok record matches to req size
    record does not match to req size
      ok FieldTail.offset is after all data in record
      ok FieldHead.offset is somewhere in record

HeadFetch()
  ok Head already at BOF
  ok Fetch would go beyond BOF
  ok Request size of 0
  ok Request smaller than record
  ok Request exact size of record
  Fetch crosses record boundary
  Request size larger than Field capacity
  Request larger than field size - multiple times
  Request larger than field size - and does not end on record boundary
  Request forces a post
  Request larger than 64k

TailFetch()
  Tail already at EOF
  Fetch would go beyond EOF
  Request size of 0
  Request smaller than record
  Request exact size of record
  Fetch crossees record boundary
  Request size larger than Field capacity
  Request larger than field size - multiple times
  Request larger than field size - and does not end on record boundary
  Request forces a post
  Request larger than 64k

HeadSplit()
  Head, Tail in different records
  Head, Tail in same record
    Head == Tail
      ok Both at BOF
      ok Both in middle of record
      ok Both just beyond record length
    Head != Tail
      ok Head at 0, tail in middle
      ok Head at 0, tail just beyond record length
      ok Head in middle, tail in middle
      ok Head in middle, tail just beyond record length
      ok Head at end, tail just beyond record length

TailSplit()

TailTrim()

WholeFieldPost()

Search
  ok Null string
  Case Insensitive
    ok Single char string found
    ok Short word found
    Max size of search string found
  Search fail
    ok Put insert point just one char after last occur of sought string
    ok Case sensitive does not match, but insensitive would
  ok Sought string at just before record boundary
  ok Sought string overlapping record boundary
  Search spans single char record smaller than sought string
    ok Record is at end of sought string
    ok Record is in middle of sought string
    ok Record is at beginning of sought string
    ok Record is not part of sought string
  Search with Field buffer size of 6000
  ok Cancel out of search
  ok Change Case Sensitive checkbox during search

Replace
  ok Replace with null string
  ok Press replace button during search
  ok Press replace button as soon as enter Find Form
  ok Replace with short word
  ok Replace with max size replacement string

File Switch
  ok Go to middle of large file, then open a small file.

Doc Creation
  ok Create new doc, immediately exit
  ok Create new doc with same name as existing
  ok Create new doc, delete all text, save, open again
  ok Attempt to open DOC with no text records (only header record 0)
  ok Create uncompressed doc, save, open again. Check info.
  ok Create compressed doc, save, open again. Check info.
  ok Create encrypted doc with max length password, save, open again. Check info.
  ok Create encrypted doc with null password, save, open again.
  ok Create doc with max length file name
  ok Create doc with null file name - should do nothing

Encryption
  ok Open encrypted doc with wrong password, don't modify, exit, enter with right one

Preferences
  Font
    ok Set new font without document open and see what happens
    ok Try all fonts with document open
    ok Switch from small font to large font
    ok Switch from large font to small font
    ok Change font, exit program, reenter to see if preference saved
    ok Scroll using scrollbar with small font
    ok Scroll using scrollbar with large font
    ok Scroll using buttons with small font
    ok Scroll using buttons with large font
  Exact Position report
    scroll large document
    turn off exact position while doc still open, try again
    ok see that preference is saved when application exits
  Maximum compress
    ok modify a record, close DOC.
    ok switch Max compress off, try again
    ok see that preference is saved when application exits
    ok check actual size of record
  Beep on important messages
    ok On
    ok Off
  Unruled form
    ok On
    ok Off

Position restore
  ok Start app for 1st time, exit immediately, enter again
  ok Open a file, scroll to middle and make a selection, exit app, enter again
  ok Open a file, close it, close app, enter again
  ok Insertion point, selection preserved when re-entering
  ok Exit with position in file, delete file by other means, re-enter program

Run Gremlins

ok Run on Palm OS 2.0

Editing commands
  Palm Clipboard Copy
    ok No file open
    ok Copy to clipboard, paste to Memo Pad
    ok Selection too large
  Palm Clipboard Paste
    ok No file open
    ok Copy from Memo Pad, paste to ZDOCj
  Local Cut
    ok No file open
    ok Null selection
    Selection too large for allocatable cut buffer memory
    Selection single character
    Selection several pages
    Cut segment including beginning of file
    Cut segment including end of file
  Local Copy
    ok No file open
    ok Null selection
  Local Paste
    ok No file open
    ok Null paste
    Paste over selected text
    Paste over insertion point
    Not enough space in field for paste without post
    Paste would overflow field size, period
    Paste segment to beginning of file
    Paste segment to end of file

Selection commands
  Mark
    ok Try without doc open
    ok Mark same spot twice
    ok Exit program, see that mark retained
    ok Close file and reopen, see that mark gone
    ok Move to different file, see that mark gone
  Swap Point/Mark
    ok Try without document open
    ok Null selection
    ok No mark made
  Select Point to Mark
    ok Try without document open
    ok Null selection
    ok No mark made
    ok Mark is presently not in buffer

File name sort
  ok Create new file at end of list
  ok Create new file at beginning of list
  ok Create new file in middle of list
  ok Exit program, create new file by other means, enter program.
  ok Rename file from middle position to 1st, check sort order
  ok Rename file from first to last, check sort order
  ok Rename file from last to first, check sort order

Info
  ok File name correct
  ok File length correct
  ok Delete file
  ok Rename file and see that dropdown list reflects change
  ok Change backup bit

Resizing
  ok Try on Sony (3rd party)
  ok Try on Tungsten (3rd party)
  ok Sideways screen (simulator)
  Expand Dynamic Input Area
    While sideways screen
    In main form, no file open
    In main form, while editing
    While an alert is on the screen
    While New form is on screen
    While Password form is on screen
    While Info form is on screen
    While Prefs form is on screen
    While Find dialog is open
    While Goto dialog is open
  Collapse Dynamic Input Area
    While sideways screen
    In main form, no file open
    In main form, while editing
    While an alert is on the screen
    While New form is on screen
    While Password form is on screen
    While Info form is on screen
    While Prefs form is on screen
    While Find dialog is open
    While Goto dialog is open

VFS files
  ok Try on emulator with no VFS support
  ok Try on device with no VFS support
  ok Start program without Uniform.prc on device that supports VFS
  Import
    ok Attempt to import from internal memory
    ok Import file that doesn't exist
    ok Import file overwriting existing DOC
    ok Cancel out of import
    ok Import large file - 60 MB
    ok Attempt to import file too large for internal memory
    ok Import file that needs CRLF translation
    ok Import file without translation
    ok Import file that has enough CR to result in a zero-length record
  Export
    ok Attempt to export to internal memory
    ok Export to suggested file name
    ok Export to new file name
    ok Export to overwrite existing file
    ok Cancel out of export
    ok Export large file - 34 MB
    ok Attempt to export file too large for VFS memory
    ok Export file that needs translation
    ok Export file without translation

ok Start up program with no DOC files at all available

ok Try with debug ROM

Non-base memory
  ok Try file from flash card - should be ignored

Use King James Version Bible as large document - public domain, easy to know location from text.

Use The Crossing as medium-size doc that won't fit in memory.

Use Last Pod from Solon as medium-size doc that will fit in memory.

